﻿<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:MicroBlogClient" xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:Controls="clr-namespace:Rabbit.Controls;assembly=Rabbit.Controls" x:Class="MicroBlogClient.PopupdMessage"
        AllowsTransparency="True" ShowInTaskbar="False" WindowStartupLocation="Manual"
        xmlns:controls="clr-namespace:Rabbit.Controls;assembly=Rabbit.Controls"
        WindowStyle="None" Background="{x:Null}" Icon="/Resources/logo.ico"
        ResizeMode="NoResize" Opacity="0.95" ShowActivated="False"
        mc:Ignorable="d"   Width="241" Height="155" Topmost="True"
        d:DesignHeight="157" d:DesignWidth="330">
	
    <Border Style="{StaticResource MainWindowBorder}" CornerRadius="5">
        <Border CornerRadius="5" BorderThickness="1">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="122"/>
                </Grid.RowDefinitions>
                <Canvas Height="16" Grid.Row="0" VerticalAlignment="Top" Opacity="0.5" Background="{StaticResource WindowTitleBackground}" />
                <Canvas Height="32" Grid.Row="0" Background="{DynamicResource TitleBarLeftCornerHighlight}"/>
                <Border BorderBrush="{DynamicResource WindowTitleBarInnerBorder}" CornerRadius="5,5,0,0" Margin="0" BorderThickness="1,1,0,0">
                    <ContentControl>
                        <Canvas Height="32" Grid.Row="0" Margin="5,3,5,0" Background="{StaticResource WindowBackgroundBrush}">
                            <Image Height="16" Width="16" Source="/Resources/logo16.png"/>
                            <TextBlock Text="{StaticResource AppTitle}" Canvas.Left="22" Style="{DynamicResource AppTitleStyle}"/>
                            <Button  Style="{DynamicResource WindowTitleBarButtonStyle}" Canvas.Right="0"  Click="btnTitleBarClose_Click">
                                <Button.Content>
                                    <controls:ImageEx Source="{DynamicResource CloseButton}" Height="12" Width="14"/>
                                </Button.Content>
                            </Button>
                        </Canvas>
                    </ContentControl>
                </Border>
                <Border Grid.Row="1" Padding="10" CornerRadius="3" Background="White">
                	<Grid>
                		<Grid.RowDefinitions>
                			<RowDefinition Height="*"/>
                			<RowDefinition Height="30"/>
                		</Grid.RowDefinitions>
                		<Grid.ColumnDefinitions>
                			<ColumnDefinition Width="40"/>
                			<ColumnDefinition Width="*"/>
                		</Grid.ColumnDefinitions>
                        <controls:ImageEx Grid.Column="0"
                                          Height="40"  Width="40" 
                                          VerticalAlignment="Top" HorizontalAlignment="Left"
                                          Source="{Binding UserPictureUrl}"/>
                        
                        <TextBlock Grid.Row="0" Margin="5,0,0,0" Grid.Column="1" VerticalAlignment="Top" Cursor="Hand" TextTrimming="CharacterEllipsis" TextWrapping="Wrap">
                            <Hyperlink x:Name="linkOpenUser" Click="linkOpenUser_Click" >
                                <Run Text="{Binding UserName,FallbackValue=韩现龙}"/></Hyperlink>
                            <Hyperlink Click="linkShowNewMessage_Click"> 
                            <Run Text="{Binding Message,FallbackValue=消息提示，此处是消息提示，你能看到吗，这是消息提示}"
                                /> <!--Style="{DynamicResource PopupMessageStyle}"-->
                                </Hyperlink>
                        </TextBlock>
                        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Grid.Column="1">
                            <TextBlock>
                                <Hyperlink Click="linkShowNewMessage_Click">
                                    <TextBlock>有</TextBlock>
                                        <TextBlock Foreground="Red" Text="{Binding MessageCount,FallbackValue=1}"/>
                                        <TextBlock Text="{Binding MessageType, FallbackValue=微博,StringFormat={}条新{0}}"/>
                                </Hyperlink>
                            </TextBlock>
                            <TextBlock Margin="20,0,0,0">
                                <Hyperlink Click="btnSettings_Click">
                                    设置
                                </Hyperlink>
                            </TextBlock>
                		</StackPanel>
                	</Grid>
                </Border>
            </Grid>
        </Border>
    </Border>
</Window>
